#include <cstdio>
using namespace std;

#define BUF_SIZE 1024

int main()
{
    char buf[BUF_SIZE];
    scanf(" %s", buf);

    char *i;
    for (i = buf; *i != '\0'; i++) {
        if (*i >= 'a' && *i <= 'z')
            *i = ('a' + 'z') - *i;
        if (*i >= 'A' && *i <= 'Z')
            *i = ('A' + 'Z') - *i;
    }
    printf("%s\n", buf);   

    return 0;
}